<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>

	<div>

    <table id="commonTable" class="blueTbl" width="100%">
     <tr>
       <th colspan="7">
        	Child Detail
       </th>
      </tr>
      <tr>
        <th>Child Group</th>
        <td colspan="5">
   			<s:property value="child.childGroup"  />
    	</td>
      </tr>
      <tr>
        <th style="width:150px">Name</th>
        <td colspan="5">
     		<s:property value="child.name" />
    	</td>
      </tr>

      <tr>
        <th>Full Name</th>
        <td colspan="5">
   			<s:property value="child.fullName"  />
    	</td>
      </tr>
      <tr>
	      <th>Code</th>
	        <td>
	     		<table>
					<s:property value="child.code"/>
				</table>
	       </td>
	       <th style="width:140px">Date Of Birth</th>
	       <td>
	     			<s:date
	     				name="child.dateOfBirth"
	     				format="yyyy/MM/dd"
	     				/>
	    	</td>
	    	<th style="width:140px">Date Of Registration</th>
	       <td>
	     			<s:date
	     				name="child.dateOfRegistration"
	     				format="yyyy/MM/dd"
	     				/>
	    	</td>
      </tr>
      <tr>
        <th>Gender</th>
        <td>
     		<table>
     			<s:property value="child.sexType" />
     		</table>
    	</td>
    	<th>Race</th>
        <td>
     		<table>
     			<s:property value="child.race"  />
     		</table>
    	</td>
    	<th>Religion</th>
        <td>
   			<s:property value="child.religion" />
    	</td>
      </tr>
      <tr>
        <th>Birth Certificate</th>
        <td style="white-space: nowrap;">
     		<table>
     			<s:property value="child.birthCertificate" />
     		</table>
    	</td>
    	<th>Proforma</th>
        <td style="white-space: nowrap;">
     		<table>
     			<s:property value="child.proforma"  />
     		</table>
    	</td>
    	<th>Vaccination Card</th>
        <td style="white-space: nowrap;">
   			<s:property value="child.vaccinationCard" />
    	</td>
      </tr>
      <tr>
        <th>Disable</th>
        <td>
     		<s:property value="child.disable" />
    	</td>
    	<th>Type of Disability</th>
        <td colspan="3">
     		<s:property value="child.typeOfDisability"  />
    	</td>
      </tr>
      <tr>
    	<th>Grade</th>
        <td>
     		<table>
     			<s:property value="child.grade"/>
     		</table>
    	</td>
    	<th>School</th>
        <td colspan="3">
     		<s:property value="child.school" />
    	</td>
       </tr>
      <tr>
        <th>Intake Method</th>
        <td  colspan="5">
			<s:property value="child.intakeMethod"  />
    	</td>
      </tr>
      <tr>
        <th>Comment</th>
        <td colspan="5">
			<s:property value="child.comment" escape="false"/>
    	</td>
      </tr>

      <tr>
        <th>History</th>
        <td colspan="5">
			<s:property value="child.history" escape="false"/>
    	</td>
      </tr>

      <tr>
        <td colspan="3">
        	<s:url var="childPictureFrameUrl" action="frame" namespace="/childPicture" includeParams="none">
				<s:param name="childId" value="child.id"></s:param>
			</s:url>

        	<sj:a href="%{#childPictureFrameUrl}" targets="childDetailViewDiv"><input type="button" value="Pictures" /></sj:a>
			|
			<s:url var="childGuardianFrameUrl" action="frame" namespace="/childGuardian" includeParams="none">
				<s:param name="childId" value="child.id"></s:param>
			</s:url>

			<sj:a href="%{#childGuardianFrameUrl}" targets="childDetailViewDiv"><input type="button" value="Guardians" /></sj:a>
			|
			<s:url var="childRecordFrameUrl" action="frame" namespace="/childRecord" includeParams="none">
				<s:param name="childId" value="child.id"></s:param>
			</s:url>

			<sj:a href="%{#childRecordFrameUrl}" targets="childDetailViewDiv"><input type="button" value="Records" /></sj:a>

			|
			<s:url var="childBankFrameUrl" action="frame" namespace="/childBank" includeParams="none">
				<s:param name="childId" value="child.id"></s:param>
			</s:url>

			<sj:a href="%{#childBankFrameUrl}" targets="childDetailViewDiv"><input type="button" value="Bank" /></sj:a>
			<s:if test="!isSponsor()">
				|
				<s:url var="childSponsorFrameUrl" action="frame" namespace="/childSponsor" includeParams="none">
					<s:param name="childId" value="child.id"></s:param>
				</s:url>

				<sj:a href="%{#childSponsorFrameUrl}" targets="childDetailViewDiv"><input type="button" value="Sponsors" /></sj:a>
			</s:if>
			|
			<s:url var="childReportFrameUrl" action="frame" namespace="/childReport" includeParams="none">
				<s:param name="childId" value="child.id"></s:param>
			</s:url>

			<sj:a href="%{#childReportFrameUrl}" targets="childDetailViewDiv"><input type="button" value="Report" /></sj:a>
    	</td>
    	<td colspan="2">&nbsp;
    	</td>
    	<td>
			<s:if test="!isSponsor()">
			  <%--
    			<s:url var="createProfileUrl" action="select" namespace="/child" includeParams="none">
			 		<s:param name="id" value="%{child.id}"></s:param>
			 	</s:url>
			 	<sj:a href="%{createProfileUrl}" targets="childResultDiv"><input type="button" value="Create Profile" /></sj:a>
 			  --%>
			 	<s:url var="childEditUrl" action="edit" namespace="/child" includeParams="none">
			 		<s:param name="id" value="%{child.id}"></s:param>
			 	</s:url>
			 	<sj:a href="%{childEditUrl}" targets="childResultDiv"><input type="button" value="Edit" /></sj:a>
				 |
				<s:if test="child.deleted == 0">
	 			 	<s:url var="childDeleteUrl" action="delete" namespace="/child" escapeAmp="false" includeParams="none">
				 		<s:param name="id" value="%{child.id}"></s:param>
				 	</s:url>
				 	<sj:a href="%{childDeleteUrl}" targets="childResultDiv" onClickTopics="/confirmDelete"><input type="button" value="Delete" /></sj:a>
			 	</s:if>
			 	<s:else>
			 		<s:url var="childActivateUrl" action="activate" namespace="/child" escapeAmp="false" includeParams="none">
				 		<s:param name="id" value="%{child.id}"></s:param>
				 	</s:url>
				 	<sj:a href="%{childActivateUrl}" targets="childResultDiv"><input type="button" value="Activate" /></sj:a>
			 	</s:else>
			 </s:if>
		</td>

      </tr>
    </table>

</div>


<div id="childDetailViewDiv" style="margin: 20px 0 0 0px">

</div>
